<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>我评论的</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../plugins/mui/mui.min.css">
		<script src="../../js/statistics.js"></script>
		<style type="text/css">
			 *{
            box-sizing: border-box;
            font-family: 'Microsoft YaHei';
	        }
	        body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, form,  input, p, table, th, td ,select,option{
	            padding: 0;
	            margin: 0;
	            list-style: none;
	        }
	        body{
	        	padding-top:44px;
	        }

			/*title的样式覆盖*/
			.mui-bar{
				background-color:#2a2c33;
				top:0;
			}
			.mui-bar>a{
				color:#fff;
			}
			.mui-title{
				color:#fff;
			}
			/*列表数字角标移动防止盖住右箭头*/
			.down{
				height:7px;
				background-color:transparent;
				position: relative;
			}
			.down>span{
				border:none;
				border:7px solid transparent;
				border-top-color:#fff;
				position:absolute;
				width:0px;
				height:0px;
				left:25%;
				top:0px;
				display:block;
				transition: all linear .2s;
				-webkit-transform: translateX(-50%);
			}
			.mui-table-view-cell{
				text-align: center;
				font-size:15px;
			}
			.two{
				left:75%!important;
			}
			.green{
				color:#43ac45;
			}
			
			.mui-row>div:first-child:before{
				content:'';
				width:1px;
				height:20px!important;
				background-color:#e5e5e5;
				float:right;
				margin-top:11.5px;
			}
			
			.mui-backdrop {
			    position: fixed;
			    top: 0;
			    right: 0;
			    bottom: 0;
			    left: 0;
			    z-index: 998;
			    background-color: rgba(0,0,0,.3);
			    display:none;
			}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">我评论的</h1>
		</header>
		<div class="mui-row" style='background-color:#fff' >
	        <div class="mui-col-sm-6 mui-col-xs-6 green" onclick='add(0,this)'>
	            <li class="mui-table-view-cell">
	              	 帖子
	            </li>
		    </div>
	        <div class="mui-col-sm-6 mui-col-xs-6" onclick='add(1,this)'>
	            <li class="mui-table-view-cell">
	                                 新闻
	            </li>
	        </div>
	    </div>
	    <div class='down'>
	    	<span></span>
	    </div>
		<div class='mui-backdrop'>
			
		</div>
		<script type="text/javascript" src="../../plugins/jquery/jquery-3.1.0.min.js"></script>
		<script src="../../plugins/mui/mui.min.js"></script>
		<!--<script type="text/javascript" src="../plugins/mui/update.js"></script>-->
		<script type="text/javascript">
			var mainWebview;
			var barItemWebviewArray = [];
			var barItemArray = ['comment-2.html','comment-3.html'];
			var curBarItemWebview;
			mui.init({
			    
			 });
	  		mui.plusReady(function() {
				  //关闭等待框0
				plus.nativeUI.closeWaiting();
				    //显示当前页面
				mui.currentWebview.show('slide-in-right',200);
				
				mainWebview = plus.webview.currentWebview();
				inittabitemWebviews();
			});
			
			function add(i,b){
				curBarItemWebview.hide();
				barItemWebviewArray[i].show();
				curBarItemWebview=barItemWebviewArray[i];
				$('.green').removeClass('green');
				$(b).addClass('green');
				if(i==0){
					$('.down>span').removeClass('two');
				}else{
					$('.down>span').addClass('two');
				}
			}
			function inittabitemWebviews(){
				for(var i=0;i<barItemArray.length;i++){
				barItemWebviewArray[i] = mui.preload({
					id:barItemArray[i],
					url:barItemArray[i],
					styles:{
						top:'95px',
						bottom: '0',
						left: '0px',
						bounce: 'vertical'
					},
					 waiting:{
				      autoShow:true,//自动显示等待框，默认为true
				      title:'正在加载...'//等待对话框上显示的提示内容
      				},
      				 extras:{
						width:document.body.offsetWidth,
						height:$('.mui-backdrop').height()
					}
				});
				barItemWebviewArray[i].hide();
				mainWebview.append(barItemWebviewArray[i]);
				}
				barItemWebviewArray[0].show();
				curBarItemWebview = barItemWebviewArray[0];
		}
		</script>
	</body>
</html>

